home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
util4
/
anegato.lha
/
A.negato1.2
/
Source
/
ASetup.code
< prev
next >
Wrap
Text File
|
1992-09-02
|
2KB
|
62 lines
WBStartup : WbToScreen 0 ;eseguibile da Workbench
SetErr:DisplayBeep_(0):End:End SetErr ;in caso di errore, esce senza GURU
LoadFont 0,"topaz.font",8
Window 0,35,15,0,100,$8,"",1,2 : yy=WTopOff-11 ;yy: per controllare la
Dim vet.s(5) ;grandezza dei font
b=15
For a=0 To 5 Step 2 ;i 3 gadget
StringGadget 0,10,15+b+yy,0,a,19,120 ;di sinistra.
b+15 ;La lunghezza max di input
;è di 19 caratteri
Next
b=15
For a=1 To 5 Step 2
StringGadget 0,160,15+b+yy,0,a,19,120 ;e quelli di destra
b+15
Next
BorderPens 2,1
TextGadget 0,124,80+yy,0,6," Usa "
Window 0,35,15,300,100+yy,$1000|$2|$4|$8,"Accesso negato 1.2 - T.dMan 1/1995",1,2,0
WindowFont 0 ;usiamo il font topaz 8
Repeat ;main loop
WLocate 29,5:Print"NOMI UTENTI"
WLocate 190,5:Print"PASSWORD"
w.l=WaitEvent ;attende finchè non si verifica un evento nella window 0
If w=$200 End ;close window
If w=$40 AND GadgetHit=6 Gosub usa ;se USE è stato cliccato e
;rilasciato: VAI a "usa"
Forever
usa ;label
For a=0 To 5
vet(a)=LCase$(StringText$(0,a)) ;assegna ai vettori vet[0..5] quanto è stato
;inserito nelle stringhe, e lo converte in minuscolo
Next
If vet(0)="" AND vet(2)="" AND vet(4)="" ;se TUTTE le stringhe "NOMI" sono
;vuote, ritorna al main loop
DisplayBeep_(0)
Return
End If
If OpenFile(0,"S:ANeg") ;questo e FIELD gestiscono un file ad accesso casuale
MaxLen d$=40 ;ogni campo puo' contenere
MaxLen e$=40 ;al massimo 40 caratteri
MaxLen f$=40 ;
Fields 0,d$,e$,f$
d$=vet(0)+vet(1)
e$=vet(2)+vet(3)
f$=vet(4)+vet(5)
Put 0,0 ;registra come d$, e$, f$ NOMI+PASSWORD
CloseFile 0
Else
DisplayBeep_(0)
End If
End